<%
layout("/layouts/blank.html"){
%>
<input type="hidden" value="${sessionId!}" id="sessionId"/>
<h3>会话详情:</h3>
<table id="dataTable" class="table table-bordered" style="background-color: #fff;padding: 10px">
    <tbody>
    <tr>
        <td class="td_lable lang" style="width:20%">SESSIONID</td>
        <td>${sessionId!}</td>
    </tr>
    <tr>
        <td class="td_lable lang">客户端信息</td>
        <td id="UserAgent"></td>

    </tr>
    <tr>
        <td class="td_lable lang">创建时间</td>
        <td id="CreateTime"></td>

    </tr>
    <tr>
        <td class="td_lable lang">最后访问时间</td>
        <td id="LastAccessTime"></td>

    </tr>
    <tr>
        <td class="td_lable lang">访问ip地址</td>
        <td id="RemoteAddress"></td>

    </tr>
    <tr>
        <td class="td_lable lang">请求次数</td>
        <td id="RequestCount"></td>

    </tr>
    <tr>
        <td class="td_lable lang">总共请求时间</td>
        <td id="RequestTimeMillisTotal"></td>

    </tr>
    <tr>
        <td class="td_lable lang">请求间隔<br> [<span title="count of < 1 ms">-</span> <span
                title="count of 1 - 10 ms">-</span> <span title="count of 10 - 100 ms"> -</span> <span
                title="count of 100 - 100 ms"> -</span> <span title="count of 1 - 10 s"> -</span> <span
                title="count of 10 - 100 s"> -</span> <span title="count of 100 - 1000 s"> -</span> <span
                title="count of 1000 - 10000 s"> -</span> <span title="count of > 10000 s"> -</span>]
        </td>
        <td id="RequestInterval"></td>

    </tr>
    <tr>
        <td class="td_lable lang">执行中</td>
        <td id="RunningCount"></td>

    </tr>
    <tr>
        <td class="td_lable lang">最大并发</td>
        <td id="ConcurrentMax"></td>

    </tr>
    <tr>
        <td class="td_lable lang">Jdbc执行数</td>
        <td id="JdbcExecuteCount"></td>

    </tr>
    <tr>
        <td class="td_lable lang">Jdbc时间</td>
        <td id="JdbcExecuteTimeMillis"></td>

    </tr>
    <tr>
        <td class="td_lable lang">事务提交数</td>
        <td id="JdbcCommitCount"></td>

    </tr>
    <tr>
        <td class="td_lable lang">事务回滚数</td>
        <td id="JdbcRollbackCount"></td>

    </tr>
    <tr>
        <td class="td_lable lang">读取行数</td>
        <td id="JdbcFetchRowCount"></td>

    </tr>
    <tr>
        <td class="td_lable lang">更新行数</td>
        <td id="JdbcUpdateCount"></td>

    </tr>
    </tbody>
</table>
<script type="text/javascript">
    $(function () {
        var index = layer.load(0, {
            shade: false
        });
        $.post(base + '/druid/websession-' + $('#sessionId').val() + '.json', {}, function (data) {
            layer.close(index);
            if (data.ResultCode == 1) {
                for (key in data.Content) {
                    $('#' + key).text(data.Content[key]);
                }
            } else if (data.msg) {
                core.showMsg(data.msg, data.ok);
            }
            else {
                core.showMsg("调用druid api失败!")
            }
        }, 'json');
    })
</script>
<%}%>